<?php
// Connection's Parameters
$db_host="localhost";
$db_name="wepopkl";
$username="root";
$password="";
// Connection
$con = mysql_connect($db_host,$username,$password);
if ($con) 
	{echo "berhasil konek!" ;}
else die("tidak berhasil konek");

$con_db = mysql_select_db($db_name) ;
if ($con_db)
	{echo "berhasil memilih database" ;}
	else die("tidak bisa milih db");

	$id_pkl=mysql_insert_id($con);
	
	$sql="INSERT INTO pkl (id_pkl, nama, alamat, informasi, id_region)
VALUES
('$_POST[id_pkl]','$_POST[nama]','$_POST[alamat]','$_POST[informasi]','$_POST[region]')";



if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
echo "1 record added";

mysql_close($con);	
?>